
/**
 * @description: 剧本-分镜-镜头
 * @fileName: lens
 * @author: 17076
 * @date: 2025/3/24-下午2:14
 * @version: V1.0.0
 **/
const state = () => ({
  // 选中的分镜数据
  selectLens: null,
  // 当前查看模式 list-列表模式 grid-单图模式
  mode: 'grid',
  // 当前作品状态 1 - 剧本章节 2 - 角色设定 3 - 分镜内容 4 - 分镜绘制
  playStatus: '1',
  // 画面比例 ------ 废弃
  pictureScale: '',
  // 是否自动生成镜头图片 1-开启 0-关闭 -----废弃
  createLens: '0',
  // 导演反馈选中的镜头id
  directorSelectLensId: null,
  // 是否显示剧本章节的下一步
  showNext1: false,
  // 是否显示角色设定的下一步
  showNext2: false,
  // 是否显示分镜内容的下一步
  showNext3: false
})
const getters = {
  selectLens: (state) => state.selectLens,
  mode: (state) => state.mode,
  playStatus: (state) => state.playStatus,
  pictureScale: (state) => state.pictureScale,
  createLens: (state) => state.createLens,
  directorSelectLensId: (state) => state.directorSelectLensId,
  showNext1: (state) => state.showNext1,
  showNext2: (state) => state.showNext2,
  showNext3: (state) => state.showNext3
}
const mutations = {
  setSelectLens(state, selectLens) {
    state.selectLens = selectLens
  },
  changeMode(state, mode) {
    state.mode = mode
  },
  changePlayStatus(state, playStatus) {
    state.playStatus = playStatus
  },
  changePictureScale(state, pictureScale) {
    state.pictureScale = pictureScale
  },
  changeCreateLens(state, createLens) {
    state.createLens = createLens
  },
  changeDirectorSelectLensId(state, directorSelectLensId) {
    state.directorSelectLensId = directorSelectLensId
  },
  changeShowNext1(state, showNext1) {
    state.showNext1 = showNext1
  },
  changeShowNext2(state, showNext2) {
    state.showNext2 = showNext2
  },
  changeShowNext3(state, showNext3) {
    state.showNext3 = showNext3
  }
}
const actions = {
  setSelectLens({ commit }, selectLens) {
    commit('setSelectLens', selectLens)
  },
  changeMode({ commit }, mode) {
    commit('changeMode', mode)
  },
  changePlayStatus({ commit }, playStatus) {
    commit('changePlayStatus', playStatus)
  },
  changePictureScale({ commit }, pictureScale) {
    commit('changePictureScale', pictureScale)
  },
  changeCreateLens({ commit }, createLens) {
    commit('changeCreateLens', createLens)
  },
  changeDirectorSelectLensId({ commit }, directorSelectLensId) {
    commit('changeDirectorSelectLensId', directorSelectLensId)
  },
  changeShowNext1({ commit }, showNext1) {
    commit('changeShowNext1', showNext1)
  },
  changeShowNext2({ commit }, showNext2) {
    commit('changeShowNext2', showNext2)
  },
  changeShowNext3({ commit }, showNext3) {
    commit('changeShowNext3', showNext3)
  }
}
export default { state, getters, mutations, actions }
